/*
 *  Copyright 2010 UPF Telecos 4th group G.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package edu.upf.userinterface;

import edu.upf.content.DescriptionContent;
import edu.upf.core.User;
import edu.upf.network.ContentTransfer;

/**
 * Interface that presents the basic methods that the jMedia user interface
 * must have.
 * @author netjois
 */
public interface UserInterface {

    /**
     * Adds a user to the list of users shown
     * @param user
     */
    public void addUserToList(User user);

    public void updateUserList(User user);

    /**
     * Removes a user from the shown user list
     * @param user
     */
    public void removeUserFromList(User user);

    /**
     * Shows a log on the user interface space log
     * @param log
     */
    public void userLog(String log);

    /**
     * Adds a result from of a search performed
     * @param receivedContent
     */
    public void addResult(DescriptionContent receivedContent);

    /**
     * Clear the results shown
     */
    public void clearResults();

    /**
     * Starts a chat session with some available contact. It must have the
     * capability of <b>self-destroying</b> at a user request.
     * @param user
     */
    public void startChatWith(String user);

    /**
     * Notify to the user a new state in the software (i.e.:logout state)
     * @param state 
     */
    public void updateState(int state);

    /**
     * Shows the received Content
     * @param content
     * @param local
     */
    public void viewContent(DescriptionContent content, boolean local);

    public void showViewerImage(DescriptionContent content, boolean local);

    public void addTransfer(ContentTransfer transfer);

    public void showExceptionMessage(String level, String message, String trace);

    public void updateDownloads();
    
    /**
     * Show the contents inside the loaded components
     */
    public void showContents();
    
}
